public function getName() {
return 'Mostlinkedtemplates';
}
-
+
/**
* Is this report expensive, i.e should it be cached?
*
public function isExpensive() {
return true;
}
-
+
/**
* Is there a feed available?
*
public function sortDescending() {
return true;
}
-
+
/**
* Generate SQL for the report
*
COUNT(*) AS value
FROM {$templatelinks}
WHERE tl_namespace = " . NS_TEMPLATE . "
- GROUP BY 1, 2, 3";
+ GROUP BY 1, 2, 3";
}
-
+
/**
* Pre-cache page existence to speed up link generation
*
* @param Database $dbr Database connection
* @param int $res Result pointer
*/
- public function preprocessResults( $dbr, $res ) {
+ public function preprocessResults( &$dbr, &$res ) {
$batch = new LinkBatch();
while( $row = $dbr->fetchObject( $res ) ) {
$title = Title::makeTitleSafe( $row->namespace, $row->title );
if( $dbr->numRows( $res ) > 0 )
$dbr->dataSeek( $res, 0 );
}
-
+
/**
* Format a result row
*
return "Invalid title in result set; {$tsafe}";
}
}
-
+
/**
* Make a "what links here" link for a given title
*
$wgLang->formatNum( $result->value ) );
return $skin->makeKnownLinkObj( $wlh, $label, 'target=' . $title->getPrefixedUrl() );
}
-
}
/**
$mlt = new SpecialMostlinkedtemplates();
$mlt->doQuery( $offset, $limit );
}
-